{include file="header.html"}
<script src="/js/ckeditor/ckeditor.js"></script>

<div class="page-header">
	<h6>
		项目分类管理
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			编辑项目分类
		</small>
	</h6>
</div>
<div class="row">
<div class="col-xs-12">
	<form class="form-horizontal" role="form" method="post" action="?app=category&act=edit" enctype="multipart/form-data">
		<input type="hidden" id="id" name="id" value="{$row->id}" class="col-xs-6" />
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="name"> 分类名称 </label>
			<div class="col-sm-10">
				<input type="text" id="name" name="name" value="{$row->name}" class="col-xs-6" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="parent_id"> 上级分类 </label>
			<div class="col-sm-10">
				<select name="parent_id" id="parent_id" class="form-control" style="width:155px;">
					<option value="">根分类</option>
					{$categorys}
				</select> 
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="pic"> 图片 </label>
			<div class="col-sm-10">
				<div class="col-file col-xs-3"><input type="file" id="pic" name="pic" value="" /></div>
				{if $row->pic}<a href="{$row->pic}" target="_blank"><img src="{$row->pic}" width="100" /></a>{/if}
				<input type="hidden" name="origin_pic" value="{$row->pic}" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="memo"> 备注 </label>
			<div class="col-sm-10">
				<input type="text" id="memo" name="memo" value="{$row->memo}" class="col-xs-6" />
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="keywords"> 关键词 </label>
			<div class="col-sm-10">
				<input type="text" id="keywords" name="keywords" value="{$row->keywords}" class="col-xs-6" />
			</div>
		</div>
		
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="status"> 状态 </label>
			<div class="col-sm-10">
				<div class="radio">
					<label>
						<input type="radio" name="status" value="1"  class="ace" {if $row->status == 1 }checked{/if}/>
						<span class="lbl"> 正常</span>
					</label>
				</div>
				<div class="radio">
					<label>
						<input type="radio" name="status" value="0" class="ace" {if $row->status == 0 }checked{/if}/>
						<span class="lbl"> 隐藏 </span>
					</label>
				</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label no-padding-right" for="sort"> 排序 </label>
			<div class="col-sm-10">
				<input type="text" name="sort" id="sort" value="{$row->sort}" class="col-xs-2" />
				<span class="some-line">数字越小，排在越前</span>
			</div>
		</div>
		<div class="clearfix form-actions">
			<div class="col-md-offset-3 col-md-9">
				<button class="btn btn-info" type="submit">
					<i class="ace-icon fa fa-check bigger-110"></i>
					提交
				</button>

				&nbsp; &nbsp; &nbsp;
				<button class="btn" type="reset">
					<i class="ace-icon fa fa-undo bigger-110"></i>
					重置
				</button>
			</div>
		</div>
	</form>
</div>
</div>

{include file="footer.html"}